Fully-parameterized, first-class modules with hygienic macros

نویسنده

  • Josef Martin Gasbichler
چکیده

It is possible to define a formal semantics for configuration, elaboration, linking, and evaluation of fully-parameterized first-class modules with hygienic macros, independent compilation, and code sharing. This dissertation defines such a semantics making use of explicit substitution to formalize hygienic expansion and linking. In the module system, interfaces define the static semantics of modules and include the definitions of exported macros. This enables full parameterization and independent compilation of modules even in the presence of macros. Thus modules are truly exchangeable components of the program. The basis for the module system is an operational semantics for hygienic macro expansion—computational macros as well as rewriting-based macros. The macro semantics provides deep insight into the nature of hygienic macro expansion through the use of explicit substitutions instead of conventional renaming techniques. The semantics also includes the formal description of Macro Scheme, the meta-language used for evaluating computational macros.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Refining Hygienic Macros for Modules and Separate Compilation

Genuine differences in the treatment of identifiers in block-structured languages and those that provide qualified names for accessing components of modules or aggregate data structures invalidate some of the assumptions hygienic macro systems are based on. We will investigate how these assumptions have to be changed, and the consequences for the construction of hygienic macro expanders. Macro ...

متن کامل

First-Class Modules for Perl

ML’s functors allow developers to write code which generates software modules at compile time. We present a system for a similar, but more powerful, feature for the popular industrygrade language Perl, which is frequently used for implementing Internet services and “glue” software. This enables the modular development of parameterized packages and classes, as well as several other features ofte...

متن کامل

Fully idempotent and coidempotent modules

In this paper, the notion of fully idempotent modules is defined and it is shown that this notion inherits most of the essential properties of the usual notion of von Neumann's regular rings. Furthermore, we introduce the dual notion of fully idempotent modules (that is, fully coidempotent modules) and investigate some properties of this class of modules.

متن کامل

A Theory of Hygienic Macros

Hygienic macro systems, such as Scheme’s, automatically rename variables to prevent unintentional variable capture—in short, they “just work.” Yet hygiene has never been formally presented as a specification rather than an algorithm. According to folklore, the definition of hygienic macro expansion hinges on the preservation of alphaequivalence. But the only known notion of alpha-equivalence fo...

متن کامل

The Semantics of Syntax Applying Denotational Semantics to Hygienic Macro Systems

Typically, when semanticists hear the words “Scheme” or “Lisp”, what comes to mind is “untyped lambda calculus plus higher-order state and first-class control”. Given our typical concerns, this seems to be the essence of Scheme: it is a dynamically typed applied lambda calculus that supports mutable data and exposes first-class continuations to the programmer. These features expose a complete c...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006